/**
 * 搜索相关请求模块
 */

import request from "../utils/request";

// 获取联想建议
const getSearchSuggestion = function(q) {
    return request({
        method: 'GET',
        url: '/v1_0/suggestion',
        params: {
            q: q
        }
    })
}

// 获取搜索结果
const getSearchResult = (params) => {
    return request({
        method: 'GET',
        url: '/v1_0/search',
        params: params
    })
}

export {getSearchSuggestion, getSearchResult}
